package com.glc.hms.core.compress.algorithm;

import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

/**
 * GZIP压缩算法
 *
 * @author Lin
 * @time 2019-12-04 22:16
 */
@Slf4j
public class GZIPCompressAlgorithm extends AbstractCompressAlgorithm {

    @Override
    protected OutputStream createOutputStream(OutputStream output) throws IOException {
        return new GZIPOutputStream(output);
    }

    @Override
    protected InputStream createInputStream(InputStream input) throws IOException {
        return new GZIPInputStream(input);
    }
}
